package com.wanxi.demo;

public class SumArray {
    public static void main(String[] args) {
//        静态定义，直接赋值
//        动态定义，只有长度
        int[] arr = {22, 74, 5, 7, 558, 9, 17, 44};
        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] % 2 == 0 && arr[i] % 10 != 7 && arr[i] / 10 % 10 != 7) {
                sum += arr[i];
                System.out.print(arr[i]+" ");
            }
        }
        System.out.println("和为：" + sum);
    }
}
